Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
cytoscape-qtip
Advanced tools
A Cytoscape.js extension that wraps the qTip jQuery library
It is recommended that, where possible, you use cytoscape-popper
with tippy.js
instead of cytoscape-qtip
.
qtip2
library that this extension wraps is no longer maintained by its author.qtip2
does not have proper support for npm+webpack and npm+browserify, whereas cytoscape-popper
does -- as do popper.js
and tippy.js
.cytoscape-popper
does not require jquery
.qtip2
requires the use of jquery@1
or jquery@2
, which are both no longer maintained.Download the library:
npm install cytoscape-qtip
,bower install cytoscape-qtip
, orrequire()
the library as appropriate for your project:
CommonJS:
var cytoscape = require('cytoscape');
var cyqtip = require('cytoscape-qtip');
cyqtip( cytoscape ); // register extension
AMD:
require(['cytoscape', 'cytoscape-qtip', 'jquery'], function( cytoscape, cyqtip, jquery ){
cyqtip( cytoscape, jquery ); // register extension
});
Note that jquery
must point to a jQuery object with .qtip()
registered if AMD is used.
Plain HTML/JS has the extension registered for you automatically, because no require()
is needed.
This extension wraps the qTip API so it can be used on Cytoscape.js graph elements instead of HTML DOM elements.
You can call qTip on graph elements:
eles.qtip({ /* options ... */ });
You can call qTip on the core:
cy.qtip({ /* options ... */ });
See the qTip API for details on configuration.
If you want to access the qTip API for an element:
var api = ele.qtip('api');
If you want to access the qTip API for the core:
var api = cy.qtip('api');
See the qTip docs for details on the API. If you create more than one qTip on an element and use its API, you'll have to cache the api
references after creating each qTip.
You may not use options.position.target
. If you require a different value, like 'body'
or 'mouse'
, you don't need this extenstion -- you can simply use the qTip APIs directly on a DOM element.
These are additional options you can use for convenience. Remember: This extension is just a wrapper to qTip. If you require more complex behaviour, you should manually use the qTip API.
options.position.adjust.cyViewport
: When true
, updates element qTip position on zoom and pan. Note you'll need your own mechanism to hide out-of-bounds qTips, such as customising the parent container.
options.show.cyBgOnly
: When true
, shows core qTips only for events originated on the core (not bubbled). Useful for "background" events.
options.hide.cyBgOnly
: When true
, hides core qTips only for events originated on the core (not bubbled). Useful for "background" events.
options.hide.cyViewport
: When true
, hides qTips when the viewport is manipulated (i.e. zoom/pan).
export VERSION=1.2.3
gulp
FAQs
A Cytoscape.js extension that wraps the qTip jQuery library
The npm package cytoscape-qtip receives a total of 344 weekly downloads. As such, cytoscape-qtip popularity was classified as not popular.
We found that cytoscape-qtip demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.